package io.renren.modules.medical.entity;


import com.baomidou.mybatisplus.annotation.*;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;

/**
 * NotEmpty 用在集合上面，一般用来校验List类型(不能注释枚举)，而且长度必须大于0
 * NotBlank 用在String上面，一般用来校验String类型不能为空，而且调用trim()后，长度必须大于0。
 * NotNull 用在所有类型上面，一般用来校验Integer类型不能为空，但可以为empty。
 * @author luosheng
 * @email luoshengshuai@foxmail.com
 * @date 2023-03-31 09:15:43
 */

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("health_guidance")
public class HealthGuidanceEntity extends QueryPageBaseEntity {
	private static final long serialVersionUID = 1L;

	/**
	 * 饮食建议
	 */
	@NotBlank(message = "dietaryAdvice不能未空", groups = {UpdateGroup.class, AddGroup.class})
	private String dietaryAdvice;
	/**
	 * 运动建议
	 */
	@NotBlank(message = "exerciseAdvice不能未空", groups = {UpdateGroup.class, AddGroup.class})
	private String exerciseAdvice;

	/**
	 * 状态:[0:审核中,1:在使用,2:停用]
	 */
	@Null(message = "新增或修改不需要status值", groups = {UpdateGroup.class, AddGroup.class})
	private Integer status;
	/**
	 * 审核id
	 */
	@Null(message = "新增或修改不需要审核id", groups = {UpdateGroup.class, AddGroup.class})
	private Long auditorId;
}
